﻿/*******************************************************************************
 * Copyright © 2016-2020 北京网非科技有限公司 版权所有
 * Author: 北京网非科技有限公司
 * Description: 网非快速开发平台NET
 * Website：http://www.wfdot.com
*********************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CubicFWNet.Data.SystemManage.Model
{
    [Table("Module")]
    public class Module
    {
        public Module()
        {
            //this.Id = Guid.NewGuid();
            this.CascadeId = string.Empty;
            this.Name = string.Empty;
            this.Status = true;
            this.ParentName = string.Empty;
            this.CreateTime = DateTime.Now;
            this.SortNo = 0;
        }

        [Key]
        [DisplayName("主键")]
        public System.Guid Id { get; set; }

        [DisplayName("级联")]
        [MaxLength(50)]
        public string CascadeId { get; set; }

        [DisplayName("名称")]
        [Required]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar")]
        public string Name { get; set; }

        [DisplayName("链接")]
        [MaxLength(256)]
        public string Url { get; set; }

        [DisplayName("叶子菜单")]
        public bool IsLeaf { get; set; }

        [DisplayName("图标")]
        [MaxLength(256)]
        [Column(TypeName = "varchar")]
        public string IconName { get; set; }


        [DisplayName("状态")]
        public bool Status { get; set; }


        [DisplayName("排序号")]
        public int SortNo { get; set; }

        [Index("IX_ParentId_Module", IsClustered = false)]
        public Nullable<System.Guid> ParentId { get; set; }

        [DisplayName("上级菜单")]
        [MaxLength(50)]
        public string ParentName { get; set; }

        public System.DateTime CreateTime { get; set; }

        public System.Guid CreatorId { get; set; }

    }
}
